package com.cmy.framework_base.common.loading

import androidx.fragment.app.FragmentManager

/**
 * @name:
 *  SimpleLoadDialogImp
 * @package:
 *  com.cmy.framework_base.common.loading
 * @date:
 *  2023/4/2617:14
 * @author
 *    cmy
 * @description
 *  简单弹窗实现
 */
class SimpleLoadDialogImp(manager: FragmentManager):LoadDialogView {
    private val fragmentManager = manager

    private val tag = "Loading"


    private val loadDialog by lazy {
        LoadDialog().also {
            it.isCancelable = false
        }
    }

    override fun showLoadView() {
            loadDialog.showNow(fragmentManager,tag)
    }

    override fun dismissLoadView() {
           loadDialog.dismiss()
    }

    override fun dismissLoadView(delay: Long) {

    }

    override fun dismissDelayWith(delay: Long, runnable: Runnable?) {
        TODO("Not yet implemented")
    }
}